//
// Created by v on 2025/11/18.
//

#ifndef JKLIBS_CMSTORAGEMANAGER_H
#define JKLIBS_CMSTORAGEMANAGER_H

#include <ios>
#include <sys/statvfs.h>

class CMStorageManager
{
public:
    CMStorageManager(std::string &dev_path);
    virtual ~CMStorageManager();

    size_t all_size();
    size_t free_size();
    size_t available_size();

protected:
    int storage_init();

private:
    std::string device_name;
    struct statvfs pri_vfs;
};

#endif // JKLIBS_CMSTORAGEMANAGER_H
